// Copyright 2018 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the “License”);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// <https://apache.org/licenses/LICENSE-2.0>.
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an “AS IS” BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// This file was generated by scripts/generate-benchmark.py, do not modify!

const dataBig = [{
  a: '0x2DBB786A758F9AB3F8F4C69A105150BD19825F3473D2C20D',
  r: '-0x2DBB786A758F9AB3F8F4C69A105150BD19825F3473D2C20D',
}, {
  a: '0xAB4ED6E68418536B89B31731D65AE45075DE0A4431',
  r: '-0xAB4ED6E68418536B89B31731D65AE45075DE0A4431',
}, {
  a: '0x9E4C0A70FBF16ABC4CAB76C4DA10D64FC007F06CD6D688',
  r: '-0x9E4C0A70FBF16ABC4CAB76C4DA10D64FC007F06CD6D688',
}, {
  a: '-0xD7316C51787E47B2C689021E3BEBD08B9572AB02177B2130B5E7',
  r: '0xD7316C51787E47B2C689021E3BEBD08B9572AB02177B2130B5E7',
}, {
  a: '-0x6659D8D58144666655D96A209F5A662FE6F9FD08F856A9B4B853B441631',
  r: '0x6659D8D58144666655D96A209F5A662FE6F9FD08F856A9B4B853B441631',
}, {
  a: '0xC0E88FADDCA264B7BBA984D3E8EBFD0830104CCF2E6B55A078898CB16E3A1',
  r: '-0xC0E88FADDCA264B7BBA984D3E8EBFD0830104CCF2E6B55A078898CB16E3A1',
}, {
  a: '-0xFD38EE9039198A2FC89F3CA1A06F42C29A4D9F298F3AB18180',
  r: '0xFD38EE9039198A2FC89F3CA1A06F42C29A4D9F298F3AB18180',
}, {
  a: '0xA2B345900BBD5C909BB49DEF4C622E3691E1878F4D2502C58E',
  r: '-0xA2B345900BBD5C909BB49DEF4C622E3691E1878F4D2502C58E',
}, {
  a: '0x2404360F4256A08B922C8B13A3C1A7C15BF87B98815C827A56655334E05',
  r: '-0x2404360F4256A08B922C8B13A3C1A7C15BF87B98815C827A56655334E05',
}, {
  a: '-0xC71D087E19635FB9CABCBCEBDA59F64A569057E64C6D6D6D3',
  r: '0xC71D087E19635FB9CABCBCEBDA59F64A569057E64C6D6D6D3',
}, {
  a: '-0x5CABE99474006EC2F8EB8430E8F674EA1C7CE451464C3A9C0454DC5F5DBCD5348AA',
  r: '0x5CABE99474006EC2F8EB8430E8F674EA1C7CE451464C3A9C0454DC5F5DBCD5348AA',
}, {
  a: '0x3CF67B5926E7CB33484BC831F770F6181027BF84F',
  r: '-0x3CF67B5926E7CB33484BC831F770F6181027BF84F',
}, {
  a: '0x3D569C6BF820280E72B53457E902FF69C706DFE',
  r: '-0x3D569C6BF820280E72B53457E902FF69C706DFE',
}, {
  a: '-0x8DA3137DB97291E199A4BEEF1D9ED4DE173FD2BA36DAA33EB59D499E2015',
  r: '0x8DA3137DB97291E199A4BEEF1D9ED4DE173FD2BA36DAA33EB59D499E2015',
}, {
  a: '0xDBCE424D0233E5A5A9FC9206323D652C694177718B9B13',
  r: '-0xDBCE424D0233E5A5A9FC9206323D652C694177718B9B13',
}, {
  a: '0x67E57838D4075797D742E24F1A7D722D60B4C6F2F0F17F9C04D9',
  r: '-0x67E57838D4075797D742E24F1A7D722D60B4C6F2F0F17F9C04D9',
}, {
  a: '0x78DB1977E37560F1842F12E9F5CB483703945CDFAE2827226A0D67',
  r: '-0x78DB1977E37560F1842F12E9F5CB483703945CDFAE2827226A0D67',
}, {
  a: '0x83899984F55EDFDAF92970069AAECD2C6A3FCBBA475B53BCE46DDF79845A3B877',
  r: '-0x83899984F55EDFDAF92970069AAECD2C6A3FCBBA475B53BCE46DDF79845A3B877',
}, {
  a: '-0x851CF9ABD6EDF7BA77E5288D991DB81F2A60DBD4B25D9',
  r: '0x851CF9ABD6EDF7BA77E5288D991DB81F2A60DBD4B25D9',
}, {
  a: '0xCE15C38185593A322C5464C67C5D4DD0BD2434',
  r: '-0xCE15C38185593A322C5464C67C5D4DD0BD2434',
}, {
  a: '-0x70D06F5EDD0210A4DD723B28C49ACB7D86DE390D35FEF68ECDDAAFF09FA4646DE1EB22',
  r: '0x70D06F5EDD0210A4DD723B28C49ACB7D86DE390D35FEF68ECDDAAFF09FA4646DE1EB22',
}, {
  a: '0xC83556821F6E848417A2BB569A744F642FDFA896A4C019CE6C2CA',
  r: '-0xC83556821F6E848417A2BB569A744F642FDFA896A4C019CE6C2CA',
}, {
  a: '-0x9D121F3BC5AC2814B2E1177277B7590CEA333AA0990AB6ECBE54B0435873228E852AE',
  r: '0x9D121F3BC5AC2814B2E1177277B7590CEA333AA0990AB6ECBE54B0435873228E852AE',
}, {
  a: '0x928A61FA5D2424BD6987780EA8507AC9BF82D4AB9F00F07DC349',
  r: '-0x928A61FA5D2424BD6987780EA8507AC9BF82D4AB9F00F07DC349',
}, {
  a: '0x553B08AAA8E4EEDADCDB68758C23982C9B1167C4902AE58B22B',
  r: '-0x553B08AAA8E4EEDADCDB68758C23982C9B1167C4902AE58B22B',
}, {
  a: '0xBF3C6486F17C92ACB45D28D2A8B143DD8D3B1C4EE73390788A0DB2D30DBD51764DA902',
  r: '-0xBF3C6486F17C92ACB45D28D2A8B143DD8D3B1C4EE73390788A0DB2D30DBD51764DA902',
}, {
  a: '-0x4D90C15863C121A4429B10949848FA44F4418981EF6B37FFBA4C4DE',
  r: '0x4D90C15863C121A4429B10949848FA44F4418981EF6B37FFBA4C4DE',
}, {
  a: '0x6BFB0825AD8F02FB9082A6048A749F178A1BEBB88A6A',
  r: '-0x6BFB0825AD8F02FB9082A6048A749F178A1BEBB88A6A',
}, {
  a: '0x9570D0E45B519548421389AB7FB6955198F70431B74C7',
  r: '-0x9570D0E45B519548421389AB7FB6955198F70431B74C7',
}, {
  a: '0x50C27DB1E9239B6A8594AA8255E0C7CA01C4F64C2E9C646844F7DCABE6A234E464388',
  r: '-0x50C27DB1E9239B6A8594AA8255E0C7CA01C4F64C2E9C646844F7DCABE6A234E464388',
}, {
  a: '0x1C0BD95AF11B2687616AA654CF578E4D900A4656443C857F2FF84BCD6B',
  r: '-0x1C0BD95AF11B2687616AA654CF578E4D900A4656443C857F2FF84BCD6B',
}, {
  a: '0xC81F5BB1F0A141B827A11BD6282EAE48618',
  r: '-0xC81F5BB1F0A141B827A11BD6282EAE48618',
}, {
  a: '-0x279E925D26CA22C2C05BD5C75AF3200E0B5B',
  r: '0x279E925D26CA22C2C05BD5C75AF3200E0B5B',
}, {
  a: '0xDFC735F57770E8CA7CB99E0FD86C8FC25AE6B69ABB8CEEE6C09DD0D42D8132',
  r: '-0xDFC735F57770E8CA7CB99E0FD86C8FC25AE6B69ABB8CEEE6C09DD0D42D8132',
}, {
  a: '-0xF5B60CD0E66F4D98FB6EECFCD5F6657922714764745741DA0560384F8B4',
  r: '0xF5B60CD0E66F4D98FB6EECFCD5F6657922714764745741DA0560384F8B4',
}, {
  a: '-0x7FF8A0956F26BB95802F6BC1F7DD9D7D24FA020E48FC29517F10C855',
  r: '0x7FF8A0956F26BB95802F6BC1F7DD9D7D24FA020E48FC29517F10C855',
}, {
  a: '0x7B5850A49945091911AE7AB786DF18BF6265C3CFEAE5AAA288133CE4EBF1',
  r: '-0x7B5850A49945091911AE7AB786DF18BF6265C3CFEAE5AAA288133CE4EBF1',
}, {
  a: '0x9A971D46014B3B10E2F6FD58424F8A625AFC928B84629DCA1B79C45B789',
  r: '-0x9A971D46014B3B10E2F6FD58424F8A625AFC928B84629DCA1B79C45B789',
}, {
  a: '-0x4DD6AD8859E6E916A46961CB165A350096F5',
  r: '0x4DD6AD8859E6E916A46961CB165A350096F5',
}, {
  a: '0x2A4CA9F66D193F9542BF6920B4B581A86E84B13DFF5DDDC7326CBC8F54A9F7E288CBA7',
  r: '-0x2A4CA9F66D193F9542BF6920B4B581A86E84B13DFF5DDDC7326CBC8F54A9F7E288CBA7',
}, {
  a: '-0x40BB1F410C97002EECEDAA47E8F7FC960D927CB9D9B960841D84',
  r: '0x40BB1F410C97002EECEDAA47E8F7FC960D927CB9D9B960841D84',
}, {
  a: '0xC73A40BB2812D5010DC538A7D9340E914A45E',
  r: '-0xC73A40BB2812D5010DC538A7D9340E914A45E',
}, {
  a: '-0x14118FD09F24D0AF2D0F0B066F39A5D2588564FB21EBC5021D32FA99DF5E382F',
  r: '0x14118FD09F24D0AF2D0F0B066F39A5D2588564FB21EBC5021D32FA99DF5E382F',
}, {
  a: '0x89C73A712FF6D62E4C245E674624795DFC2FD7',
  r: '-0x89C73A712FF6D62E4C245E674624795DFC2FD7',
}, {
  a: '0x77D93D0E635AB4AB9FFD1795ABC845ABC292AFE252BCD8E3553F88F5C83A0850BA7',
  r: '-0x77D93D0E635AB4AB9FFD1795ABC845ABC292AFE252BCD8E3553F88F5C83A0850BA7',
}, {
  a: '-0xB1CE52B9AD120F86D76F96D602394FD156FDD0A3E30E91F85720937C6F',
  r: '0xB1CE52B9AD120F86D76F96D602394FD156FDD0A3E30E91F85720937C6F',
}, {
  a: '0xD2D590DF69651DE615B791475BE3888E1E7B4C762996A0E919B00853398E0750',
  r: '-0xD2D590DF69651DE615B791475BE3888E1E7B4C762996A0E919B00853398E0750',
}, {
  a: '0xC4FD507A4C7A50374C9F856EA2E5F04FE6E8DBDA98CF6C8622D29EAAB2',
  r: '-0xC4FD507A4C7A50374C9F856EA2E5F04FE6E8DBDA98CF6C8622D29EAAB2',
}, {
  a: '0x43C502C46E2B98BEDBE6DC821461C8D12E7A6C600D9E35F4916086D9C3F485D95',
  r: '-0x43C502C46E2B98BEDBE6DC821461C8D12E7A6C600D9E35F4916086D9C3F485D95',
}, {
  a: '0x59EB31CF9DEB5070EBDCE19F5CE79A56C79',
  r: '-0x59EB31CF9DEB5070EBDCE19F5CE79A56C79',
}, {
  a: '0xB891ECBCABA566FADD66B3628446B129D5238AAB',
  r: '-0xB891ECBCABA566FADD66B3628446B129D5238AAB',
}, {
  a: '0xAA3988374AA9DE5965A58300D8D202B8FB91A7352325C6539879C5CBB53B04C',
  r: '-0xAA3988374AA9DE5965A58300D8D202B8FB91A7352325C6539879C5CBB53B04C',
}, {
  a: '-0xFBC3D969CC81BC482EBAB9DF5895C6190CDBA766899E4',
  r: '0xFBC3D969CC81BC482EBAB9DF5895C6190CDBA766899E4',
}, {
  a: '-0x16DB9D2BC7B181F4150B781A06CDC7EDADEC925BF5E1321CB7F67F525B0682A',
  r: '0x16DB9D2BC7B181F4150B781A06CDC7EDADEC925BF5E1321CB7F67F525B0682A',
}, {
  a: '-0x39BC200776487BA1F70B87E0DFA1F43E40F3891E3B73',
  r: '0x39BC200776487BA1F70B87E0DFA1F43E40F3891E3B73',
}, {
  a: '0x6DC01ED441F04B4BEF16182AA51FB7422DC0FCD390848A9CF276C35EDBC',
  r: '-0x6DC01ED441F04B4BEF16182AA51FB7422DC0FCD390848A9CF276C35EDBC',
}, {
  a: '0x167CCEA06C90D8119F9C2F39FF3C1CBE72F93C44C01F6795B0EB9679A7',
  r: '-0x167CCEA06C90D8119F9C2F39FF3C1CBE72F93C44C01F6795B0EB9679A7',
}, {
  a: '-0x3331FA741DB819C7B3F5B3D69083B9424174B3C2547',
  r: '0x3331FA741DB819C7B3F5B3D69083B9424174B3C2547',
}, {
  a: '-0x1B74B816F78DA0BECAD791779EAB1CCA8B95DC1773B9940F6FB9ABCAF845704',
  r: '0x1B74B816F78DA0BECAD791779EAB1CCA8B95DC1773B9940F6FB9ABCAF845704',
}, {
  a: '-0x2787284292A7CEFE6F489097C5A42006C41033E1DF34CA71F8732B4432A1AC06506CBC',
  r: '0x2787284292A7CEFE6F489097C5A42006C41033E1DF34CA71F8732B4432A1AC06506CBC',
}, {
  a: '0xC627A072FB27605854D728D00983C28FF4D232D70A18C40213406A9C146792AA8B05EB',
  r: '-0xC627A072FB27605854D728D00983C28FF4D232D70A18C40213406A9C146792AA8B05EB',
}, {
  a: '0xDF75BA835A0D3151B4E7C9F9EF4A17F6C527C',
  r: '-0xDF75BA835A0D3151B4E7C9F9EF4A17F6C527C',
}, {
  a: '0x46A839992728E6E307689D34ECEF84D5EDBF',
  r: '-0x46A839992728E6E307689D34ECEF84D5EDBF',
}, {
  a: '0xC76EFFC7F9CEEF6C7C52C51CB7CA8F760D61D7DD23084A3387CE',
  r: '-0xC76EFFC7F9CEEF6C7C52C51CB7CA8F760D61D7DD23084A3387CE',
}, {
  a: '0xC5EBE7224B261F4B0F4638C080528389AF492E522DA579DB475460',
  r: '-0xC5EBE7224B261F4B0F4638C080528389AF492E522DA579DB475460',
}, {
  a: '-0xA434A567FD77387EC065D685C37C4B0624EA120C10B2B0F3CBCED3F6B2BD0C5FC35',
  r: '0xA434A567FD77387EC065D685C37C4B0624EA120C10B2B0F3CBCED3F6B2BD0C5FC35',
}, {
  a: '-0xCFF00507DEC22539A98EB81DE43D2A36BE2BE8E630B1E25AD66A68D4660',
  r: '0xCFF00507DEC22539A98EB81DE43D2A36BE2BE8E630B1E25AD66A68D4660',
}, {
  a: '0x17A5BB8602E87E228E1D19BB550279268896D1F597244ABC03CBCEC8D625B09A',
  r: '-0x17A5BB8602E87E228E1D19BB550279268896D1F597244ABC03CBCEC8D625B09A',
}, {
  a: '0xBADA2F62D6146EE4F1E371C478CE65982AD66ABFE7E41193B25D2',
  r: '-0xBADA2F62D6146EE4F1E371C478CE65982AD66ABFE7E41193B25D2',
}, {
  a: '0xF6D6A34E2E874BFF56DED510F3A79CE9FD5D16E6D6A9463A5CDC3BED8B3FAD2364D',
  r: '-0xF6D6A34E2E874BFF56DED510F3A79CE9FD5D16E6D6A9463A5CDC3BED8B3FAD2364D',
}, {
  a: '0x2D30DEA21EACE613A315336B0977674129AC16C49B1F78F8076B8',
  r: '-0x2D30DEA21EACE613A315336B0977674129AC16C49B1F78F8076B8',
}, {
  a: '0x646AAE7A3A5B4012ED82AADC4C61991E5387B31F',
  r: '-0x646AAE7A3A5B4012ED82AADC4C61991E5387B31F',
}, {
  a: '0xCC01DB6BFBE813FD6E9431C4281CD829C8DA3F11845D7E',
  r: '-0xCC01DB6BFBE813FD6E9431C4281CD829C8DA3F11845D7E',
}, {
  a: '-0x6482A8D6EBFEE28D0B901B4148EAB171651B406F66202A9ABFF40ED7FA7CF82EC5',
  r: '0x6482A8D6EBFEE28D0B901B4148EAB171651B406F66202A9ABFF40ED7FA7CF82EC5',
}, {
  a: '-0xF275460B556B938B03408F825892BA948A03247',
  r: '0xF275460B556B938B03408F825892BA948A03247',
}, {
  a: '0x431054AFE8696FA8701F5AA28D1488F35948CD7A46DF692AB33D17A3FCD9B2799A20',
  r: '-0x431054AFE8696FA8701F5AA28D1488F35948CD7A46DF692AB33D17A3FCD9B2799A20',
}, {
  a: '0xF390AED408050492958D6E27B4FC2704A5BF6810D7E1FF6AF151BC89',
  r: '-0xF390AED408050492958D6E27B4FC2704A5BF6810D7E1FF6AF151BC89',
}, {
  a: '0x1F65AE738E7E51B0E3B87236AAF162471A6',
  r: '-0x1F65AE738E7E51B0E3B87236AAF162471A6',
}, {
  a: '0xEA82B4ACB30DBDB5C6950D58AF234C5A18C4727',
  r: '-0xEA82B4ACB30DBDB5C6950D58AF234C5A18C4727',
}, {
  a: '-0xE9BDCFAFE6734B33922275ED5FED3B0C667D0546F24FDAB773',
  r: '0xE9BDCFAFE6734B33922275ED5FED3B0C667D0546F24FDAB773',
}, {
  a: '0xD0C7AEDE1F80E2EDBAD3DDF142B1505AAEC5D1679F26AF79CCE545A024',
  r: '-0xD0C7AEDE1F80E2EDBAD3DDF142B1505AAEC5D1679F26AF79CCE545A024',
}, {
  a: '-0x976E228301A0C8BD5C48A5511DA8BF12AAFE8850E36E',
  r: '0x976E228301A0C8BD5C48A5511DA8BF12AAFE8850E36E',
}, {
  a: '0x92D54D993B3DCD6D876FE88B1CAD633B8DF31AE0EAB83105AED3C304C30F60D5E',
  r: '-0x92D54D993B3DCD6D876FE88B1CAD633B8DF31AE0EAB83105AED3C304C30F60D5E',
}, {
  a: '0xE6C4223FF3FD183C99EA24F2F9C4D68599416A388897C7541947C',
  r: '-0xE6C4223FF3FD183C99EA24F2F9C4D68599416A388897C7541947C',
}, {
  a: '0x266D04CD81FA30AFBCC7308FF17BE07EC6DBF974DDFA44A1DB300B334AFD9',
  r: '-0x266D04CD81FA30AFBCC7308FF17BE07EC6DBF974DDFA44A1DB300B334AFD9',
}, {
  a: '-0xDFFE8CFE1A4A9039398A411AB42AF9399C869ABEE8D2',
  r: '0xDFFE8CFE1A4A9039398A411AB42AF9399C869ABEE8D2',
}, {
  a: '0x5E11491B348F70452014AFEACCC115ACB52BFDE08EBF222',
  r: '-0x5E11491B348F70452014AFEACCC115ACB52BFDE08EBF222',
}, {
  a: '0xFC38D6113157EA646AA2D61ADAE1753E9261A',
  r: '-0xFC38D6113157EA646AA2D61ADAE1753E9261A',
}, {
  a: '-0xD2683BD77AF84250BB534C6E32E1D387539E2D50933F90380B0A8F',
  r: '0xD2683BD77AF84250BB534C6E32E1D387539E2D50933F90380B0A8F',
}, {
  a: '0x4EF007D272EA637AA000ED7E42AF81782D30D3B454F3C8051754',
  r: '-0x4EF007D272EA637AA000ED7E42AF81782D30D3B454F3C8051754',
}, {
  a: '0x2105E742E66A88A1B13F1CC73BED82310539',
  r: '-0x2105E742E66A88A1B13F1CC73BED82310539',
}, {
  a: '-0x336DE799DAE59BEAFB329B9D18A0A07B7F2D2E23DB6F89E8EB065D2F38665E',
  r: '0x336DE799DAE59BEAFB329B9D18A0A07B7F2D2E23DB6F89E8EB065D2F38665E',
}, {
  a: '0x94D617FB73A4F5963643517F2811FEF293ACE492BBE2A646CEB788',
  r: '-0x94D617FB73A4F5963643517F2811FEF293ACE492BBE2A646CEB788',
}, {
  a: '-0xDBCB12DAE741C30BC5772ED7AA6E8449BC663E71E66AF723F78C2E05DBD34A4',
  r: '0xDBCB12DAE741C30BC5772ED7AA6E8449BC663E71E66AF723F78C2E05DBD34A4',
}, {
  a: '-0xB8C53F0BFA94F7B6EF409A83763AF9105BFF2230344F9D6F67EAA5C55571',
  r: '0xB8C53F0BFA94F7B6EF409A83763AF9105BFF2230344F9D6F67EAA5C55571',
}, {
  a: '0xD3D241A7C03A19D69B3D74A0F30ABEDF508F1BD5F2122F39CA20AE',
  r: '-0xD3D241A7C03A19D69B3D74A0F30ABEDF508F1BD5F2122F39CA20AE',
}, {
  a: '-0x900967FD28FA8D7A881FB021EEB9EC544B9F0E',
  r: '0x900967FD28FA8D7A881FB021EEB9EC544B9F0E',
}, {
  a: '-0xDF6F4174750F426D805E85720257811235084CA70AF3C115953B5395C1D',
  r: '0xDF6F4174750F426D805E85720257811235084CA70AF3C115953B5395C1D',
}, {
  a: '0x35B5BBFBD13E7B0B00723FAF01D13ECC18E260AD9F68D0BF4D90409',
  r: '-0x35B5BBFBD13E7B0B00723FAF01D13ECC18E260AD9F68D0BF4D90409',
}, {
  a: '0x59DF4C611297725C89C39A2C6953159A997C65D5BD4DF66EA',
  r: '-0x59DF4C611297725C89C39A2C6953159A997C65D5BD4DF66EA',
}];

const dataSmall = [{
  a: '0x78D32E119C77',
  r: '-0x78D32E119C77',
}, {
  a: '-0xC402D8E722D4DAE',
  r: '0xC402D8E722D4DAE',
}, {
  a: '0xEF902C6E4CB556E',
  r: '-0xEF902C6E4CB556E',
}, {
  a: '-0x23BFE4125',
  r: '0x23BFE4125',
}, {
  a: '0xBF8D598D742',
  r: '-0xBF8D598D742',
}, {
  a: '0x1B8E414962F134',
  r: '-0x1B8E414962F134',
}, {
  a: '-0x8D7BD19B',
  r: '0x8D7BD19B',
}, {
  a: '0x70D6',
  r: '-0x70D6',
}, {
  a: '-0x9658540D68AA3A',
  r: '0x9658540D68AA3A',
}, {
  a: '-0x8534E5',
  r: '0x8534E5',
}, {
  a: '0x213',
  r: '-0x213',
}, {
  a: '-0xC2AFF48E12AF52',
  r: '0xC2AFF48E12AF52',
}, {
  a: '-0x37',
  r: '0x37',
}, {
  a: '-0xC2858670',
  r: '0xC2858670',
}, {
  a: '0xA60051B4',
  r: '-0xA60051B4',
}, {
  a: '0xAEF079AEC8F18',
  r: '-0xAEF079AEC8F18',
}, {
  a: '0xD032ACA0A931727',
  r: '-0xD032ACA0A931727',
}, {
  a: '-0xDCEBA48',
  r: '0xDCEBA48',
}, {
  a: '-0xF914',
  r: '0xF914',
}, {
  a: '0xE1DACB54ECB5A5EF',
  r: '-0xE1DACB54ECB5A5EF',
}, {
  a: '-0xDB486',
  r: '0xDB486',
}, {
  a: '0x51928C26D38947',
  r: '-0x51928C26D38947',
}, {
  a: '-0x2CD58E6F21A',
  r: '0x2CD58E6F21A',
}, {
  a: '-0x3E1BD046C617',
  r: '0x3E1BD046C617',
}, {
  a: '0xF17E18F66',
  r: '-0xF17E18F66',
}, {
  a: '0x0',
  r: '0x0',
}, {
  a: '-0x9900124B',
  r: '0x9900124B',
}, {
  a: '0x0',
  r: '0x0',
}, {
  a: '0x12C39AAA5',
  r: '-0x12C39AAA5',
}, {
  a: '-0x385FD1E2',
  r: '0x385FD1E2',
}, {
  a: '-0xC91',
  r: '0xC91',
}, {
  a: '-0x9312F21A',
  r: '0x9312F21A',
}, {
  a: '0x3DB',
  r: '-0x3DB',
}, {
  a: '0x0',
  r: '0x0',
}, {
  a: '0xECB9E4D0D281D83',
  r: '-0xECB9E4D0D281D83',
}, {
  a: '-0xD',
  r: '0xD',
}, {
  a: '-0xB1551',
  r: '0xB1551',
}, {
  a: '0x4C66E06',
  r: '-0x4C66E06',
}, {
  a: '-0x104D6',
  r: '0x104D6',
}, {
  a: '-0x25772936',
  r: '0x25772936',
}, {
  a: '-0x894EF',
  r: '0x894EF',
}, {
  a: '-0xED',
  r: '0xED',
}, {
  a: '-0x87C2',
  r: '0x87C2',
}, {
  a: '-0xEB22576270ABB1',
  r: '0xEB22576270ABB1',
}, {
  a: '-0xC',
  r: '0xC',
}, {
  a: '-0x4626E11A8A',
  r: '0x4626E11A8A',
}, {
  a: '0xFA',
  r: '-0xFA',
}, {
  a: '-0x89FB40679',
  r: '0x89FB40679',
}, {
  a: '0x25162518FC7',
  r: '-0x25162518FC7',
}, {
  a: '-0x99BFE9AF5831F509',
  r: '0x99BFE9AF5831F509',
}, {
  a: '0xF6F',
  r: '-0xF6F',
}, {
  a: '0xE7321B526B5',
  r: '-0xE7321B526B5',
}, {
  a: '-0x12',
  r: '0x12',
}, {
  a: '0x5E21BEA9E',
  r: '-0x5E21BEA9E',
}, {
  a: '-0x8629E508D3FFEE84',
  r: '0x8629E508D3FFEE84',
}, {
  a: '0xA5245D6E4',
  r: '-0xA5245D6E4',
}, {
  a: '0x7AC1E80FFB5',
  r: '-0x7AC1E80FFB5',
}, {
  a: '0x0',
  r: '0x0',
}, {
  a: '0x9719F3DE2',
  r: '-0x9719F3DE2',
}, {
  a: '0x0',
  r: '0x0',
}, {
  a: '0x9BFDA9FDA5828',
  r: '-0x9BFDA9FDA5828',
}, {
  a: '-0x72C',
  r: '0x72C',
}, {
  a: '0x9441',
  r: '-0x9441',
}, {
  a: '0xDC1267A4FD3',
  r: '-0xDC1267A4FD3',
}, {
  a: '0x11BF27018A4',
  r: '-0x11BF27018A4',
}, {
  a: '0xEC3',
  r: '-0xEC3',
}, {
  a: '-0x8',
  r: '0x8',
}, {
  a: '-0xFF0104494062CDAB',
  r: '0xFF0104494062CDAB',
}, {
  a: '0x7154B5CF1F979',
  r: '-0x7154B5CF1F979',
}, {
  a: '0x804986',
  r: '-0x804986',
}, {
  a: '0x9A8486D2C0',
  r: '-0x9A8486D2C0',
}, {
  a: '0x498',
  r: '-0x498',
}, {
  a: '0x6D65DCB2BE9A',
  r: '-0x6D65DCB2BE9A',
}, {
  a: '-0xA9C1',
  r: '0xA9C1',
}, {
  a: '-0xE3B17CA546E429E5',
  r: '0xE3B17CA546E429E5',
}, {
  a: '-0xD00',
  r: '0xD00',
}, {
  a: '0x1DF92726512BAA79',
  r: '-0x1DF92726512BAA79',
}, {
  a: '-0xA1B66',
  r: '0xA1B66',
}, {
  a: '-0x833',
  r: '0x833',
}, {
  a: '-0x7953D31B60A84D0',
  r: '0x7953D31B60A84D0',
}, {
  a: '0xDD043F6F34A16D',
  r: '-0xDD043F6F34A16D',
}, {
  a: '-0x23E51633CC0',
  r: '0x23E51633CC0',
}, {
  a: '0x408DC7831C7F074',
  r: '-0x408DC7831C7F074',
}, {
  a: '0xACA4229613807',
  r: '-0xACA4229613807',
}, {
  a: '-0x91',
  r: '0x91',
}, {
  a: '-0x996652973',
  r: '0x996652973',
}, {
  a: '0x39E3B1C44',
  r: '-0x39E3B1C44',
}, {
  a: '-0x91F3AFE84EA',
  r: '0x91F3AFE84EA',
}, {
  a: '0x14F029FE828',
  r: '-0x14F029FE828',
}, {
  a: '-0x5616E',
  r: '0x5616E',
}, {
  a: '0x0',
  r: '0x0',
}, {
  a: '-0x7EE6FF87CA6B183',
  r: '0x7EE6FF87CA6B183',
}, {
  a: '-0xCECC590',
  r: '0xCECC590',
}, {
  a: '0x9901A6B11BB',
  r: '-0x9901A6B11BB',
}, {
  a: '-0xE56B4C',
  r: '0xE56B4C',
}, {
  a: '-0x25105553B93',
  r: '0x25105553B93',
}, {
  a: '-0xE286CA',
  r: '0xE286CA',
}, {
  a: '0x90279378486CF2',
  r: '-0x90279378486CF2',
}, {
  a: '0xF',
  r: '-0xF',
}, {
  a: '0x50',
  r: '-0x50',
}];

import JSBI from '../dist/jsbi.mjs';
const JSBigInt = JSBI.BigInt;

let errorCount = 0;

const dataBigNative = [];
const dataBigJsbi = [];
const dataSmallNative = [];
const dataSmallJsbi = [];

function hexParseN(s) {
  if (s.charCodeAt(0) === 0x2D) return -BigInt(s.slice(1));
  return BigInt(s);
}
function parseNative(d) {
  if (d.b) {
    return {a: hexParseN(d.a), b: hexParseN(d.b), r: hexParseN(d.r)};
  }
  return {a: hexParseN(d.a), r: hexParseN(d.r)};
}
function hexParse(s) {
  if (s.charCodeAt(0) === 0x2D) {
    const result = JSBigInt(s.slice(1));
    result.sign = true;
    return result;
  }
  return JSBigInt(s);
}
function parseJSBI(d) {
  if (d.b) {
    return {a: hexParse(d.a), b: hexParse(d.b), r: hexParse(d.r)};
  }
  return {a: hexParse(d.a), r: hexParse(d.r)};
}
function prepareData(src, dstNative, dstJsbi) {
  for (let i = 0; i < src.length; i++) {
    const d = src[i];
    dstNative.push(parseNative(d));
    dstJsbi.push(parseJSBI(d));
  }
}
prepareData(dataBig, dataBigNative, dataBigJsbi);
prepareData(dataSmall, dataSmallNative, dataSmallJsbi);


function testNative(data, reps) {
  for (let i = 0; i < data.length; i++) {
    const d = data[i];
    const r = -d.a;
    if (d.r !== r) {
      console.log('Input:    ' + d.a.toString(16));
      console.log('Result:   ' + r.toString(16));
      console.log('Expected: ' + d.r.toString(16));
      console.log('Op: -');
      errorCount++;
    }
  }
  let r;
  const t1 = Date.now();
  for (let j = 0; j < reps; j++) {
    for (let i = 0; i < data.length; i++) {
      const d = data[i];
      r = -d.a;
    }
  }
  // Confuse the compiler into thinking that the loop is needed :-)
  const d = data[data.length - 1];
  if (d.r !== r) throw new Error('no dead code elimination please');
  return Date.now() - t1;
}


function testJsbi(data, reps) {
  for (let i = 0; i < data.length; i++) {
    const d = data[i];
    const r = JSBI.unaryMinus(d.a);
    if (!JSBI.equal(r, d.r)) {
      console.log('Input:    ' + d.a.toString(16));
      console.log('Result:   ' + r.toString(16));
      console.log('Expected: ' + d.r.toString(16));
      console.log('Op: unaryMinus');
      errorCount++;
    }
  }
  let r;
  const t1 = Date.now();
  for (let j = 0; j < reps; j++) {
    for (let i = 0; i < data.length; i++) {
      const d = data[i];
      r = JSBI.unaryMinus(d.a);
    }
  }
  // Confuse the compiler into thinking that the loop is needed :-)
  const d = data[data.length - 1];
  if (!JSBI.equal(r, d.r)) throw new Error('no dead code elimination please');
  return Date.now() - t1;
}


const kRepsBig = 40000;
const kRepsSmall = 120000;

console.log('Testing unaryMinus:');
console.log('Native/big:   ' + testNative(dataBigNative, kRepsBig));
console.log('JSBI/big:     ' + testJsbi(dataBigJsbi, kRepsBig));
console.log('Native/small: ' + testNative(dataSmallNative, kRepsSmall));
console.log('JSBI/small:   ' + testJsbi(dataSmallJsbi, kRepsSmall));

if (errorCount !== 0) {
  console.error('Finished with ' + errorCount + ' errors.');
  // Support both d8 (`quit`) and Node.js (`process.exit`).
  (typeof quit !== 'undefined' ? quit : process.exit)(1);
}
